import request from '@/request/index.js'
const base = 'base' //http://101.42.107.47:30020文档

//新增字典
export const addDictApi = (data) => {
    return request({
        url: `/api/${base}/dict/add/dictList`,
        method: 'POST',
        data,
    })
}
//编辑字典
export const editDictApi = (data) => {
    return request({
        url: `/api/${base}/dict/update/dictList`,
        method: 'POST',
        data,
    })
}


//获取字典管理列表数据
export const getDictListApi = (data) => {
    return request({
        url: `/api/${base}/dict/find/dictList`,
        method: 'GET',
        params: data,
    })
}

//获取字典项列表数据
export const getDictItemListApi = (data) => {
    return request({
        url: `/api/${base}/dict/find/dict`,
        method: 'POST',
        data,
    })
}

//新增字典项
export const addDictItemApi = (data) => {
    return request({
        url: `/api/${base}/dict/add`,
        method: 'POST',
        data,
    })
}

//编辑字典项
export const editDictItemApi = (data) => {
    return request({
        url: `/api/${base}/dict/edit`,
        method: 'POST',
        data,
    })
}

//批量操作----字典项
export const batchHandleDictItemApi = (data) => {
    return request({
        url: `/api/${base}/dict/batch`,
        method: 'POST',
        data,
    })
}